<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../resources/js-test.js"></script>
</head>
<body>
<script>

description("Tests that querying the priority for a shorthand works.");

var testContainer = document.createElement("div");
document.body.appendChild(testContainer);

testContainer.innerHTML = '<div id="test">hello</div>';

e = document.getElementById('test');

// Sanity check.
e.style.setProperty("border-bottom-style", "solid", "important");
shouldBe("e.style.getPropertyValue('border-bottom-style')", "'solid'");
shouldBe("e.style.getPropertyPriority('border-bottom-style')", "'important'");

e.style.borderBottomStyle = "";
e.style.border = "20px solid green";
shouldBe("e.style.getPropertyValue('border')", "'20px solid green'");
shouldBe("e.style.getPropertyPriority('border')", "''");

e.style.border = "";
e.style.setProperty("border", "20px solid green", "important");
shouldBe("e.style.getPropertyValue('border')", "'20px solid green'");
shouldBe("e.style.getPropertyPriority('border')", "'important'");

document.body.removeChild(testContainer);
</script>
</body>
</html>
